package com.cl.common.api;

import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;

/**
 * @Description 常用API操作码
 * @Author cr7
 * @Date 2022/2/21
 * @Version V1.0
 */
@NoArgsConstructor
@AllArgsConstructor
public enum ResultCode {

    SUCCESS(200, "操作成功"),
    FAILED(500, "操作失败"),
    UNAUTHORIZED(401, "暂未登录或token已经过期或账号被顶掉"),
    FORBIDDEN(403, "没有相关权限");

    private Integer code;

    private String message;

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
